package com.mingqijia.gassafety.db.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.mingqijia.gassafety.db.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.mingqijia.gassafety.db.entity.annotation.OperateLogFiled;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * <p>
 * 运行策略
 * </p>
 *
 * @author fei.zhang
 * @since 2023-12-13
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_gss_running_strategy")
@ApiModel(value="RunningStrategy对象", description="运行策略")
public class RunningStrategy extends BaseEntity {

    private static final long serialVersionUID=1L;

    @ApiModelProperty(value = "id")
      @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @OperateLogFiled(name = "规则名称", dict = "rule_name")
    @ApiModelProperty(value = "规则名称")
    @TableField("rule_name")
    private String ruleName;
    @OperateLogFiled(name = "策略对象", codeName = "0-所有客户;1-按照行业选择;2-按照客户选择;3-套餐名称;")
    @ApiModelProperty(value = "策略对象：0所有客户 1按照行业选择 2按照客户选择 3-套餐名称")
    @TableField("strategy_obj")
    private Integer strategyObj;

    @OperateLogFiled(name = "对象", dict = "strategy_obj_values")
    @ApiModelProperty(value = "行业或者客户数据：；号隔开")
    @TableField("strategy_obj_values")
    private String strategyObjValues;

    @OperateLogFiled(name = "规则类型", codeName = "0-设备故障;1-设备离线;2-设备运行报告;3-服务到期提醒;")
    @ApiModelProperty(value = "规则类型：0设备故障 1设备离线 2设备运行报告 3服务到期提醒")
    @TableField("strategy_type")
    private Integer strategyType;

//    @OperateLogFiled(name = "报警方式", dict = "advice_type")
    @ApiModelProperty(value = "报警方式：1 短信推送 2 微信模版消息 3机器人外呼")
    @TableField("advice_type")
    private String adviceType;

    @ApiModelProperty(value = "0启用 1禁用 2失效")
    @TableField("is_disabled")
    private Integer isDisabled;

    @ApiModelProperty(value = "备注说明")
    @TableField("remark")
    private String remark;

    @ApiModelProperty(value = "企业编号")
    @TableField("sp_id")
    private String spId;
    /**
     * 创建日期最大范围
     */
    @TableField(exist = false)
    @ApiModelProperty(value = "更新时间")
    private Date createdAtEnd;

    @OperateLogFiled(name = "短信推送模板CODE")
    @ApiModelProperty(value = "短信推送模板CODE，可以为空，为空取默认")
    @TableField("sms_msg_code")
    private String smsMsgCode;

    @OperateLogFiled(name = "微信推送模板CODE")
    @ApiModelProperty(value = "微信推送模板CODE，可以为空，为空取默认")
    @TableField("wx_msg_code")
    private String wxMsgCode;

}
